// 获取元素 class 为 appWindow 的父节点
export function getParentNode(e,className){
  if(e.parentNode.className===className){
    return e.parentNode
  }
  return getParentNode(e.parentNode,className)
}

/* 
*数字左边补0输出 
*pad(9,2) => '09'
*/
export function pad(num, n) {
  var len = num.toString().length;
  while(len < n) {
    num = "0" + num;
    len++;
  }
  return num;
}